function a() {
  return new Promise((resolve, reject) => {
    setTimeout(function () {
      console.log('a');
      resolve()
    }, 1000)
  })
}

function b() {
  console.log('b');

}

async function fn() {
  await a()
  b()
}